import {
  checkOk                   // 防止重复提交
} from "@/api/getData";
import {decryptDes} from "@/utils/utils";

let local = async ()=>{
    let key = "";
    try {
      let pk = await checkOk({})

      key = new Promise(function (resolve,reject) {
        key = decryptDes(pk.data, 'shendawl', ['s', 'h', 'e', 'n', 'd', 'a', 'w', 'l']);
        resolve(key);
      })

    } catch (e) {
    }
     return key;
}


export default {
  install(vm) {
    vm.prototype.$getPageKey = local;
  }
}
